package com.wanxi;

import java.util.Scanner;

public class GetEven {
    public static void main(String[] args) {
        int start = getNumber("请输入开始数字：");
        int end = getNumber("请输入结束数字：");

        getEven(start,end);


    }



    /**
     * 得到键盘输入的一个整数
     *
     * @return
     */
    private static int getNumber(String tips) {
        Scanner scanner = new Scanner(System.in);
        System.out.print(tips);
        int num = scanner.nextInt();

        return num;
    }


    /**
     * 等到n~m之间的所有偶数
     * @param n
     * @param m
     */
    private static void getEven(int n, int m) {
        for (int i = n; i <= m; i++) {
            if (i % 2 == 0) {
                System.out.println(i);
            }
        }

    }

}
